Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide members of confidential projects #1031

Merged
merged 8 commits into from
Sep 27, 2024

Conversation

rmunn
Copy link
Contributor

@rmunn rmunn commented Aug 23, 2024

Fixes #959.

Only the following people can see the list of members if a project is confidential:

  • The manager(s) of the project
  • Site admins
  • Org admin(s) of the org(s) the project belongs to, if any

Everyone else, including people who are themselves members of the project, cannot see its membership.

NOTE: After discussion, we have tentatively decided to make project members visible if the project's confidentiality is not set; i.e. you have to explicitly set a project to confidential before its members will be hidden. We can easily change that later if user feedback suggests it's needed.

Screenshots

What the admin or project manager sees if the project is confidential:

members-visible

What non-manager members see:

image

@rmunn rmunn requested a review from hahn-kev August 23, 2024 04:20
@rmunn rmunn self-assigned this Aug 23, 2024
Copy link

github-actions bot commented Aug 23, 2024

C# Unit Tests

66 tests   66 ✅  6s ⏱️
11 suites   0 💤
 1 files     0 ❌

Results for commit c7015d1.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@hahn-kev hahn-kev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested this out manually? I suspect this will throw an auth error when users try to view a project they don't have permission to view the members of. The Access project users requirement will prevent queries of the user list, this is fine, but then the front end needs to know not to query for users which it can't know in the project load function.

@hahn-kev
Copy link
Collaborator

just tested this out and it doesn't work, the user gets an error trying to access a project that's confidential if they're not a manager.

@hahn-kev
Copy link
Collaborator

hahn-kev commented Sep 4, 2024

@rmunn where's this PR at?

Only the following people can see the list of members if a project is
confidential: the manager(s) of the project, site admins, and the org
admin(s) of the org(s) the project belongs to, if any. Everyone else,
including people who are themselves members of the project, cannot see
its membership.
@rmunn rmunn force-pushed the feat/hide-members-of-confidential-projects branch from d555fa6 to 1aff610 Compare September 24, 2024 04:20
GQL query will return an empty users list if you're not allowed to see
the project members.
@rmunn rmunn requested a review from hahn-kev September 24, 2024 07:49
@rmunn
Copy link
Contributor Author

rmunn commented Sep 24, 2024

@hahn-kev - Picked this PR up again and made it work. What do you think?

Copy link
Collaborator

@hahn-kev hahn-kev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work!

I left a couple suggestions, not sure about hiding users by default for unknown projects in this case, but I'm open either way.

As suggested by C# builtin code analyzer.
For project members, and ONLY for project members, we will default to
showing them for projects whose confidentiality has not been set. This
isn't the most secure default, but it will avoid what would likely be a
lot of user confusion.
@rmunn
Copy link
Contributor Author

rmunn commented Sep 24, 2024

@hahn-kev - Okay, I've gone ahead and implemented those changes, including the "members visible if confidentiality is not yet set" one. That one is a separate commit so it will be dead easy to revert later if we end up deciding this question the other way. Ready for re-review.

@rmunn rmunn requested a review from hahn-kev September 24, 2024 08:28
Copy link

github-actions bot commented Sep 24, 2024

UI unit Tests

12 tests   12 ✅  0s ⏱️
 4 suites   0 💤
 1 files     0 ❌

Results for commit c7015d1.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@myieye myieye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I'm happy with how you did this @rmunn 👍

Requesting changes, because as you can see in my comment I think there's some unused code to be removed. Correct me if I'm wrong.

Also, I found it a bit unsatisfying that we claim there are no users. So, I added a commit that you're free to challenge that makes 2 small changes:

  1. Preserve the current user in the list of members (otherwise it looks like they're not even a member and then they can also see their role)
  2. Add an indicator noting that the membership is confidential.

So, when the list has been filtered of other users it looks like this:
image

If I'm an org admin, project manager or site admin, it looks normal:
image

@rmunn rmunn requested a review from myieye September 25, 2024 03:24
@rmunn rmunn requested a review from hahn-kev September 26, 2024 06:41
Copy link
Contributor

@myieye myieye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good now 👍

@rmunn rmunn merged commit fc5232d into develop Sep 27, 2024
14 checks passed
@rmunn rmunn deleted the feat/hide-members-of-confidential-projects branch September 27, 2024 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hide member list for confidential projects
3 participants